//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by FernFlower decompiler)
//

package ciicos.controller;

import ciicos.base.ActionResult;
import ciicos.model.AppUserInfoVO;
import ciicos.model.AppUsersVO;
import ciicos.service.AppService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Api(
        tags = {"app用户信息"},
        value = "User"
)
@RestController
@RequestMapping({"/api/app/User"})
public class AppUserController {
    @Autowired
    private AppService appService;

    @ApiOperation("用户信息")
    @GetMapping
    public ActionResult<AppUsersVO> getInfo() {
        AppUsersVO userAllVO = this.appService.userInfo();
        return ActionResult.success(userAllVO);
    }

    @ApiOperation("通讯录详情")
    @GetMapping({"/{id}"})
    @ApiImplicitParams({@ApiImplicitParam(
            name = "id",
            value = "主键",
            required = true
    )})
    public ActionResult<AppUserInfoVO> userInfo(@PathVariable("id") String id) {
        AppUserInfoVO userInfoVO = this.appService.getInfo(id);
        return ActionResult.success(userInfoVO);
    }
}
